<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.div0,
			p {
				border: 2px solid red;
			}
			
			.div1,.div2,.div3 {
				width: 100px;
				height: 100px;
				margin: 6px;
			}
			
			.div1 {
				float: right;
				background-color: red;
			}
			
			.div2 {
				float: right;
				background-color: green;
			}
			
			.div3 {
				float: right;
				background-color: blue;
			}
			
			p {
				clear: right;
				/*消除浮动对我的影响*/
			}
			
			.div4 {
				clear: right;
			}
		</style>
	</head>

	<body>
		<div class="div0">
        <div class="div1"></div>
        <div class="div2"></div>
        <div class="div3"></div>
        <div class="div4"></div>
     </div>
     <p>浮动时看看我的位置</p>
	</body>

</html>